function fn() {
    return 1 + 2
}

const fn2 = () => 1 + 2

console.log(fn(), fn2()); //简化代码,易读写


const arr = [1, 2, 3, 4, 5, 6, 7]

const arr1 = arr.filter(function(item) {
    return item % 2
})
const arr2 = arr.filter(i => i % 2)

console.log(arr1, arr2); //[ 1, 3, 5, 7 ] [ 1, 3, 5, 7 ]